You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'link']' AND lang = 'lt'' at line 1: SELECT id FROM n_content WHERE id_title = '[NameError:%20(ArrayResolver)%20Context%20does%20not%20contains%20key%20'link']' AND lang = 'lt'